﻿public class BuffKing : HaloBase
{
    public int Range;

    public BuffKing() :base()
    {
        Type = BuffType.King;
        RelativeBuff = BuffType.Inspire;
        Range = 2;

    }

    public override bool CheckHaloCondition(UnitBase other)
    {
        if (other != Owner && (Owner.Pos - other.Pos).magnitude <= Range)
        {
            return true;
        }
        return false;
    }
    public override void OnDie()
    {
        Owner.board.GameOver = true;
        Owner.board.Winner = (Team)(1 - (int)Owner.team);
    }
    public override string ToString()
    {
        return "领袖：鼓舞周围2格的友军；领袖死亡则失败";
    }
}